﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DDE_Server.Common
{

    public enum Result : short 
    {
        FALSE = -1,
        NONE = 0,
        TRUE = 1,
        STOP = 2,
    }

    public enum BidOffer : short
    {
        B = 0,
        S = 1,
        Max,
    }

    public enum Distpatch : short
    {
        TOP1 = 0,
        TOP2 = 1,
        TOP3 = 2,
        TOP4 = 3,
        AVG = 4,
        Max,

    }

    public enum Compare : short
    {
        G = 0, // Greater >
        L = 1, // Less
        E = 2, // Equal
        Max,
    }

    class Global
    {
       public static string Text(BidOffer bid){
           switch (bid) { 
               case BidOffer.B :
                   return "B";
               case BidOffer.S:
                   return "S";
           }

           return string.Empty;
       }

       public static string Text(Distpatch dis)
       {
           switch (dis)
           {
               case Distpatch.TOP1:
                   return "TOP1";
               case Distpatch.TOP2:
                   return "TOP2";
               case Distpatch.TOP3:
                   return "TOP3";
               case Distpatch.TOP4:
                   return "TOP4";
               case Distpatch.AVG:
                   return "AVG";
           }
           return string.Empty;
       }

       public static string Text(Compare com)
       {
           switch (com)
           {
               case Compare.G:
                   return ">";
               case Compare.L:
                   return "<";
               case Compare.E:
                   return "=";
           }
           return string.Empty;
       }


       public static string Text(Result res)
       {
           switch (res)
           {
               case Result.NONE:
                   return " ";
               case Result.FALSE:
                   return "FALSE";
               case Result.TRUE:
                   return "TRUE";
           }
           return string.Empty;
       }
    }

}
